package service

import "week4/internal/dao"

type UserService struct {
	u dao.UserRepository
}

func (s *UserService) UserRegister() {
	if s.u != nil {
		s.u.AddUser()
	}

}

// MyService provider：通过构造函数将UserRepository注入
func MyService(user dao.UserRepository) *UserService {
	return &UserService{u: user}
}
